]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellDBus: Add new OpenExtensionPrefs method
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Mar 2020 01:00:57 +0000 (02:00 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 6 Mar 2020 19:03:02 +0000 (19:03 +0000)
Unlike any other methods in the Extensions API, LaunchExtensionPrefs()
opens what appears to be an application dialog, except that it is
really a separate application that the caller has no control over.

In order to address that, add a new OpenExtensionPrefs() method that
takes additional parameters (modelled after the desktop portal APIs)
that will make it possible to improve the behavior in the future.

The new parameters are ignored for now, but pushing the API out now
will allow us to fill in the functionality post the .0 release.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1074

data/dbus-interfaces/org.gnome.Shell.Extensions.xml
js/ui/shellDBus.js

index eb7be8f1ac693e5a1061b06d0f44dc354a98d553..ab80c1096688b6dd2de02ee8027926a11432ddb3 100644 (file)
 
     <!--
         LaunchExtensionPrefs:
+        Deprecated for OpenExtensionPrefs
+    -->
+    <method name="LaunchExtensionPrefs">
+      <arg type="s" direction="in" name="uuid"/>
+    </method>
+
+    <!--
+        OpenExtensionPrefs:
         @uuid: The UUID of the extension
+        @parent_window: Identifier for the application window
+        @options: Vardict with further options
+
+        Opens the prefs dialog of extension @uuid.
 
-        Launch preferences of an extension.
+        The following @options are recognized:
+
+        <variablelist>
+          <varlistentry>
+            <term>modal b</term>
+            <listitem>
+              <para>Whether the prefs window should be modal, default: false</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
     -->
-    <method name="LaunchExtensionPrefs">
+    <method name="OpenExtensionPrefs">
       <arg type="s" direction="in" name="uuid"/>
+      <arg type="s" direction="in" name="parent_window"/>
+      <arg type="a{sv}" direction="in" name="options"/>
     </method>
 
     <!--
index 691019b42f5215f43bb1d405acfb520c5db26587..983a8871230d2e294de1d6616c792ae946f33257 100644 (file)
@@ -312,6 +312,10 @@ var GnomeShellExtensions = class {
     }
 
     LaunchExtensionPrefs(uuid) {
+        this.OpenExtensionPrefs(uuid, '', {});
+    }
+
+    OpenExtensionPrefs(uuid, _parentWindow, _options) {
         let appSys = Shell.AppSystem.get_default();
         let app = appSys.lookup_app('org.gnome.Extensions.desktop');
         let info = app.get_app_info();